using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace TripleMatch
{
    [System.Serializable]
    public class DecorationInUseData
    {
        public int id;
        public int index;
        public int mixId;
        public Vector2 pos;
    }

    [System.Serializable]
    public class DecorationData
    {
        public int id;
        public int ownCount;
    }

    [System.Serializable]
    public class DecorationPiecesData
    {
        public int id;
        public int pieseCount;
    }

    /// <summary>
    /// 数据保存结构
    /// </summary>
    [System.Serializable]
    public class DecoractionSaveData
    {
        /// <summary>
        /// 正在使用中的装饰物
        /// </summary>
        public List<DecorationInUseData> decorationInUseDatas = new List<DecorationInUseData>();
        /// <summary>
        /// 玩家持有的装饰物
        /// </summary>
        public List<DecorationData> decorationDatas = new List<DecorationData>();
        /// <summary>
        /// 玩家持有装饰物碎片数量
        /// </summary>
        public List<DecorationPiecesData> decorationPiecesDatas = new List<DecorationPiecesData>();
        /// <summary>
        /// 玩家未结算的装饰物碎片数量
        /// </summary>
        public List<DecorationPiecesData> decorationPiecesUnSettledDatas = new List<DecorationPiecesData>();
    }

    /// <summary>
    /// 装饰物的信息配置
    /// </summary>
    [System.Serializable]
    public class DecorationInfoData
    {
        /// <summary>
        /// 唯一标识
        /// </summary>
        public int id;
        /// <summary>
        /// 装饰物类别 0-猫猫
        /// </summary>
        public int decorationType;
        /// <summary>
        /// 对应的图片资源
        /// </summary>
        public string spriteName;
        /// <summary>
        /// 展示层级 
        /// </summary>
        public int displayOrder;
        /// <summary>
        /// 品质类型
        /// </summary>
        public int qualityIndex;
        /// <summary>
        /// 风格所属
        /// </summary>
        public int styleGroup;
        /// <summary>
        /// 对应资源
        /// </summary>
        public Sprite sprite;
        /// <summary>
        /// 碎片兑换比例
        /// </summary>
        public int piecesTransRate = 10;
        /// <summary>
        /// 描述1 装饰物名称
        /// </summary>
        public string description1;
        /// <summary>
        /// 描述2 装饰物简介
        /// </summary>
        public string description2;
    }

    public enum DecorationType
    {
        Background,
        Furniture,
        Decoration,
        Cat,
        Foreground,
    }

    /// <summary>
    /// 装饰物组别的信息配置
    /// </summary>
    [System.Serializable]
    public class StyleGroupData
    {
        /// <summary>
        /// 唯一标识
        /// </summary>
        public int id;
        /// <summary>
        /// 组内装饰物总数量
        /// </summary>
        public int groupCount;
        /// <summary>
        /// 组内装饰物Id
        /// </summary>
        public List<int> groupItems;
        /// <summary>
        /// 组别介绍
        /// </summary>
        public string groupDescription;
    }
}